﻿<Window x:Class="EPE.WPF.UserEdit"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="修改用户" Height="300" Width="600">
    <Window.Resources>
        <ResourceDictionary Source="Resources/StylesResourceDictionary.xaml" />
    </Window.Resources>
    <Grid Style="{StaticResource GridStyle}">
           
            <GroupBox Header="用户信息" Grid.Row="1" Style="{StaticResource GroupBoxStyle}" Margin="5">
                <Grid Style="{StaticResource BorderGridStyle}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="80"></ColumnDefinition>
                        <ColumnDefinition Width="150"></ColumnDefinition>
                        <ColumnDefinition Width="80"></ColumnDefinition>
                        <ColumnDefinition Width="150"></ColumnDefinition>
                        <ColumnDefinition Width="120" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="30"></RowDefinition>
                        <RowDefinition Height="30"></RowDefinition>
                        <RowDefinition Height="30"></RowDefinition>
                        <RowDefinition Height="30"></RowDefinition>
                        <RowDefinition Height="30"></RowDefinition>
                        <RowDefinition Height="30"></RowDefinition>
                        <RowDefinition Height="*"></RowDefinition>

                    </Grid.RowDefinitions>
                    <Label Content="登录帐户" Grid.Row="0" Grid.Column="0" Name="lblName" VerticalAlignment="Center" Style="{StaticResource LabelStyle}"></Label>
                    <StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal">
                        <TextBox Text=""  Name="txtLoginName"   VerticalAlignment="Center" Style="{StaticResource TextBoxStyle}"></TextBox>
                        <Label Content="" Grid.Row="0" Grid.Column="0" Name="lblVisitorId" VerticalAlignment="Center" Visibility="Hidden" ></Label>
                    </StackPanel>
                    <Label Content="用户姓名" Grid.Row="0" Grid.Column="2" x:Name="lblAge"  VerticalAlignment="Center" Style="{StaticResource LabelStyle}"></Label>
                    <TextBox Text="" Grid.Row="0" Grid.Column="3" Name="txtUserName"  VerticalAlignment="Center" Style="{StaticResource TextBoxStyle}"></TextBox>
                    <Label Content="邮编"  Grid.Row="2"  Name="lblBirthday" VerticalAlignment="Center" Style="{StaticResource LabelStyle}" />
                    <TextBox Grid.Column="1" Grid.Row="2"  Name="txtPostNumber"  VerticalAlignment="Center" Style="{StaticResource TextBoxStyle}" />
                    <Label Content="手机" Grid.Column="2" Grid.Row="2"  Name="lblAddress" VerticalAlignment="Center" Margin="0,3" Style="{StaticResource LabelStyle}" />
                    <TextBox Grid.Column="3" Grid.Row="2" Name="txtMobil" Text=""  VerticalAlignment="Center" Style="{StaticResource TextBoxStyle}" />
                    <Label Content="联系电话"  Grid.Row="3"  Name="lblPapersType" VerticalAlignment="Center" Style="{StaticResource LabelStyle}" />
                    <TextBox Grid.Column="1" Grid.Row="3" Name="txtTel" VerticalAlignment="Center" Style="{StaticResource TextBoxStyle}" />


                    <Label Content="状态" Grid.Column="2" Grid.Row="3"  Name="lblPapersNo"  VerticalAlignment="Center" Style="{StaticResource LabelStyle}" />
                    <Label Content="邮件" Grid.Row="4"  Name="lblValidityBegin" VerticalAlignment="Center" Style="{StaticResource LabelStyle}" />
                    <TextBox Grid.Column="1" Grid.Row="4"  Name="txtEmail"  VerticalAlignment="Center" Style="{StaticResource TextBoxStyle}" />
                    <Label Content="部门 "  Grid.Row="4" Grid.Column="2"  Name="lblValidityEnd" VerticalAlignment="Center" Style="{StaticResource LabelStyle}" />
                    <Label Content="权限" Grid.Row="1"  Name="lblCertificateAgency" VerticalAlignment="Center" Margin="0,2,0,4" Style="{StaticResource LabelStyle}" />
                    <Image Grid.Column="4" Grid.Row="0" Grid.RowSpan="6" Name="imgPoto" VerticalAlignment="Center"></Image>

                    <Label Content="地址" Grid.Row="5" VerticalAlignment="Center" Style="{StaticResource LabelStyle}"></Label>
                    <TextBox Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="3" Name="txtAddress" VerticalAlignment="Center" Style="{StaticResource TextBox320}"></TextBox>


                    <StackPanel  Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="3" Orientation="Horizontal" >
                        <Button Name="btnSave"  Style="{StaticResource ButtonStyle}" Click="btnSave_Click">
                            <StackPanel Orientation="Horizontal" >
                                <Image Source="/resources/image/close05.png" Stretch="Fill" Style="{StaticResource ButtonImageStyle}"></Image>
                                <Label Content="保存" HorizontalAlignment="Center"  Style="{StaticResource ButtonLabelStyle}"></Label>
                            </StackPanel>
                        </Button>
                        <Button Name="btnClose"   Style="{StaticResource ButtonStyle}" Click="btnClose_Click">
                            <StackPanel Orientation="Horizontal" >
                            <Image Source="/resources/image/close07.png" Stretch="Fill" Style="{StaticResource ButtonImageStyle}"></Image>
                                <Label Content="取消"  HorizontalAlignment="Center"  Style="{StaticResource ButtonLabelStyle}"></Label>
                            </StackPanel>
                        </Button>
                    </StackPanel>
                    <ComboBox Grid.Column="3" Grid.Row="3"  Name="cbstatus" Style="{StaticResource ComboBoxStyle}">
                        <ComboBoxItem Content="可用" IsSelected="True" />
                        <ComboBoxItem Content="不可用" />
                    </ComboBox>
                    <ComboBox Name="cbrole"  Grid.Column="1" Grid.Row="1" Style="{StaticResource ComboBoxStyle}">
                        <ComboBoxItem Content="门卫" IsSelected="True" />
                        <ComboBoxItem Content="基础数据维护" />
                        <ComboBoxItem Content="统计报表查看" />
                        <ComboBoxItem Content="系统管理员" />
                    </ComboBox>
                    <ComboBox Grid.Column="3" Grid.Row="4" Name="cbdepartment" 
               DisplayMemberPath="DepartmentName" 
                SelectedValuePath="Id"   ItemsSource="{Binding}"  Style="{StaticResource ComboBoxStyle}">

                    </ComboBox>
                    <Label Visibility="Hidden" Content="" Grid.Column="3" Grid.Row="1" Height="28" HorizontalAlignment="Left"  Name="lbluserid" VerticalAlignment="Top" />
                    <Label Visibility="Hidden" Content="" Height="28" HorizontalAlignment="Left"  Name="lblloginname" VerticalAlignment="Top" Grid.Column="3" Grid.Row="1" />
                </Grid>
            </GroupBox>
        </Grid>
</Window>
